let source = {
    a:1,
    b:false,
    c:'hhh'
}
// type A = keyof typeof source
function pick<T, U extends keyof T>(source:T, keyarr:U[]):{
    [K in U]:T[K]
}{
    let temp:any ={};
      for(let a of keyarr){
        temp[a] = source[a]
    }
    return temp;
}